import { defineStore } from "pinia";

const useSearchHistory = defineStore('searchHistory', {
    state: () => {
        return {
            searchHisArr: JSON.parse(localStorage.getItem('searchHistory') as any) ?? [],
            keyword_Store: ''
        }
    },
    actions: {
        updateSearchHisArr(value: any) {
            this.searchHisArr = value
        },
        updateKeyWords(value: string) {
            this.keyword_Store = value
        }
    }
})

export default useSearchHistory
